home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: MegaDisc
/
MegaDisc 04 (1988)(MegaDisc Digital Publishing)(AU)[WB].zip
/
MegaDisc 04 (1988)(MegaDisc Digital Publishing)(AU)[WB].adf
/
Articles
/
CLI-colours
< prev
next >
Wrap
Text File
|
2007-12-01
|
5KB
|
118 lines
Using Colours in the CLI
************************
By Ross Kellaway.
The following text is intended to help you put more colour into
CLI environment and is also know to work well with the Epson EX-800
colour printer.
To use colour in your CLI's first open a new CLI, then type in the
following: copy * to device:filename [Return]
eg: copy * to ram:colours [Return]
or if you have a printer you can type:
copy * to prt: [Return]
In doing this you have directed all keyboard input to the specified
device and/or file. Now, if you directed input to prt: and you have
your printer turned on, it will now print each line of input from the
keyboard every time you press RETURN. Sort of an electric typewriter.
If you have directed output to the printer and you have a colour
printer then the following colour screen codes could give you colour
output text from your printer. (I can only vouch to the Epson ex-800
printer and the Olivetti DM105 because they are the only ones I have
and they work well with the screen codes).
The Colour codes you specify, in this way will change the text colour,
background colour and the text style of all input to the CLI window
from which you entered these codes. The actual colours you get from
the CLI will depend on the four colours you have chosen in preferences
eg: although esc[31m code will give red printing on the Epson Ex-800
it will not necessarily give you red on the screen in the CLI window.
To exit the command mode press: ctrl \ [return]
COLOUR & STYLE CODES FOR THE SCREEN USING WORKBENCH DEFAULT COLOURS
*******************************************************************
(This heading was preceded by Esc[32m, and turned off by Esc[0m )
The format of the escape sequence is esc[Sn;Fn;Bnm
esc[ means to press the ESC key and the [ key simultaneously
Sn is the style coding: where Sn is a number corresponding to one of
the following text styles.
0 = Plain text
1 = Bold face
3 = Italic
4 = Underline
7 = Inverse
Fn is the Foreground colour coding where Fn is one of the following
30 = Default
31 = White
32 = Binary complement colour (black for default workbench settings)
33 = Red
Bn is the Background colour coding where Bn is one of the following
40 = Default
41 = White
42 = Binary complement colour
43 = Red
eg: esc[1;33;41m
This will give a boldface red text on a white background. Now all
your input to the screen will be colour as above.
As mentioned above, to now exit the command mode and carry on as usual
press CTRL-\. Now your Cli window will function normally but you will
have the colours and style you chose above displayed in this window.
USING THE COLOUR CODES FOR THE EPSON EX-800 PRINTER
***************************************************
If you directed output to the printer using the command
Copy * to prt:
Then the esc[Fnm will work here as well, only the colours are not
dependent on the preference settings. the colours are as follows:
Esc[31m will give RED printing
Esc[32m will give GREEN printing
Esc[33m will give YELLOW printing
Esc[34m will give PURPLE printing
Esc[35m will give PINK printing
Esc[36m will give BLUE printing
NOTE that the "m" after all the ESC[ codes has to be present and MUST
be in LOWER case.
Once again close the command mode using CTRL \ and output to the
printer will be in the specified colour if you do ascii text dumps to
the printer, eg: using the TYPE command from any CLI or the print
command from within a directory utility such as DUIV. Unfortunately
word processors such as Scribble send an Initialize command to the
printer before printing thus cancelling the colour code, but if you
select the Command string option from within Scribble and specify one
of the Escape sequences above the all printing will be in the chosen
colour (likewise in "Organise" via the "set-up string").
END OF CLI-COLOURS